package com.lanou3g.zjl.chating.dao;

import android.content.Context;

import com.lanou3g.zjl.chating.dao.greendao.User;
import com.lanou3g.zjl.chating.dao.greendao.UserDao;

/**
 * Created by dllo on 15/11/19.
 */
public class UserHelper {
    private DaoSingleton daoSingleton;
    // 用户表操作类
    private UserDao userDao;

    public UserHelper(Context context) {
        daoSingleton = DaoSingleton.getInstance(context);

        userDao = daoSingleton.getUserDao();
    }

    /**
     *  添加一个用户
     * */
    public void addUser(User user) {
        userDao.insertOrReplaceInTx(user);
    }




}
